package teshop.web;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import teshop.data.domain.Customer;
import teshop.service.CustomerService;


@SuppressWarnings("serial")
@Component("customerList")
@Scope("request")
public class CustomerList implements Serializable {
	
	private CustomerService service;

	private List<Customer> customerList;

	@Autowired
	public CustomerList(CustomerService service) {
		this.service = service;
		customerList = this.service.getCustomerList();
	}

	public List<Customer> getCustomerList() {
		return customerList;
	}

	public void setCustomerList(List<Customer> customerList) {
		this.customerList = customerList;
	}
}
